/**
 * Created by Administrator on 2017/4/22.
 */

var sysLoginDao = require('../daos/mysqldaos/SysLoginDao');

module.exports = {
    loginIn:function(req, res, next){
        var param = {};
        var username = req.body.username ? req.body.username : '';
        var userpass = req.body.password ? req.body.password : '';
        param.username = username;
        param.userpass = userpass;
        sysLoginDao.loginIn(param,function(data){
            if(data.isSuccess){
                res.json({
                    "status":"success"
                });
            }else{
                res.json({
                    "status":"fail",
                    "msg":"账户或密码错误..."
                });
            }
        });

    }
};